package com.itheima.health.dao;

import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderDao {

    long countByMemberAndDateAndSetmeal(@Param("memberId") Integer memberId, @Param("orderDate")Date orderDate, @Param("setmealId")Integer setmealId);

    void insert(Order order);

    Order selectById(@Param("id") Integer id);

    Long countByOrderDateRange(@Param("startDate") Date startDate,@Param("endDate") Date endDate, @Param("status") String status);

    List<Map<String,Object>> countByHotSetMeal(@Param("topN") int topN);

    Map findById4Detail(Integer id);
}
